module.exports = exports = require('lodash')

{map, flatten, zip, parseInt} = exports
tzoffset = (new Date()).getTimezoneOffset() * 60000


Date.prototype.toZoneString = ->
    new Date(@-tzoffset).toISOString()


Object.assign(
    module.exports
    {

        month_diff : (a,b)->
            a = exports.mapint(a.split("-"))
            b = exports.mapint(b.split("-"))
            return (a[0]-b[0])*12+(a[1]-b[1])
        mapint:(collection)->
            map(collection, parseInt)
        flatzip:->
            flatten(zip.apply(@,arguments))
    }
)
